package com.st.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.st.entity.Areas;
import com.st.entity.City;
import com.st.mapper.IAreasMapper;
import com.st.mapper.ICityMapper;
import com.st.service.IAreasService;
import com.st.service.ICityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AreasServiceImpl  extends ServiceImpl<IAreasMapper, Areas> implements IAreasService {
    @Autowired
    private IAreasMapper iAreasMapper;

    @Override
    public List<Areas> findAreasByCId(String cityid) {
        QueryWrapper<Areas> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("cityid",cityid);
        return iAreasMapper.selectList(queryWrapper);
    }
}
